package top.zhan.factory.abs;

import top.zhan.factory.abs.ali.AliOrderFactory;
import top.zhan.factory.abs.wechat.WechatOrderFactory;

/**
 * 超级工厂创造器，简单工厂模式
 * @author Zhan
 * @date 2022/9/27 10:38
 */
public class FactoryProducer {
    public static OrderFactory getFactory(String type){
        if(type.equalsIgnoreCase("WECHAT")){
            return new WechatOrderFactory();
        } else if(type.equalsIgnoreCase("ALI")){
            return new AliOrderFactory();
        }
        return null;
    }
}
